import request from '@/utils/request'
import type { } from './types'

const basePre = '/api/menu'

/**
 * 获取菜单接口
 */
export function addMenu(data: any) {
  return request({
    url: `${basePre}`,
    method: 'post',
    data
  })
}
/**
 * 获取菜单接口
 */
export function  delMenu(id: string) {
  return request({
    url: `${basePre}/${id}`,
    method: 'delete',
  })
}
/**
 * 获取菜单接口
 */
export function getMenu() {
  return request({
    url: `${basePre}/del/batch`,
    method: 'get'
  })
}
/**
 * 获取菜单接口
 */
export function updateMenu() {
  return request({
    url: '/login',
    method: 'post',
    data: ''
  })
}
/**
 * 获取菜单接口
 */
export function listMenu () {
  return request({
    url: `${basePre}`,
    method: 'get'
  })
}
